using System;
using System.Text;

namespace Microsoft.WowAddonStudio.Lua.RuntimeService.WowBench
{
    /// <summary>
    /// Represents a writer that can write a sequential series of character.
    /// </summary>
	public interface IOutputWriter: IDisposable
	{
		/// <summary>
		/// Fires before text is sended to output.
		/// </summary>
		event EventHandler<OnBeforeWriteEventArgs> OnBeforeWrite;

		/// <summary>
		/// Fires after text is sended to output.
		/// </summary>
		event EventHandler<OutputWriterEventArgs> OnAfterWrite;

		/// <summary>
		/// Gets the current Encoding.
		/// </summary>
		Encoding Encoding { get; }

		/// <summary>
		/// Appends the text to the current text of a control.
		/// </summary>
		/// <param name="value">The text to append to the current contents of the text box.</param>
		void Write(string value);

		/// <summary>
		/// Appends the text to the current text of a control in new line.
		/// </summary>
		/// <param name="value">The text to append to the current contents of the text box.</param>
		void WriteLine(string value);

		/// <summary>
		/// Appends the text to the current text of a control with formatting.
		/// </summary>
		/// <param name="value">The text to append to the current contents of the text box.</param>
        void WriteFormat(string value);

		/// <summary>
		/// Appends the text to the current text of a control in new line with formatting.
		/// </summary>
		/// <param name="value">The text to append to the current contents of the text box.</param>
        void WriteLineFormat(string value);

    	/// <summary>
    	/// Appends error text to the current text of a control.
    	/// </summary>
		/// <param name="value">The text to append to the current contents of the text box.</param>
		void WriteErrorText(string value);

		/// <summary>
		/// Appends information text to the current text of a control.
		/// </summary>
		/// <param name="value">The text to append to the current contents of the text box.</param>
		void WriteInfoText(string value);
	}
}